<?php

/***************************************************************\
* FILE:		sys/pages/admin.inc
* SECTION:	pages > administrator set
* FUNCTION:	administrator toolset
* USES:	
* INCLUDES:		
* PRODUCES:	
* LAUNCHES:	
\***************************************************************/

/**
 * adds extra access checks, dependent on page state
 */
function page_inc_check_access() {
	check_access("ADMIN");
}

/**
 *
 */
function page_inc_execute_action($action) {
	global $PAGE;

	switch($action) {
		default:
			add_alert("unknown action: $action");
			break;
	}
}

/**
 * execute page logic
 */
function page_inc_execute() {
	global $PAGE, $CONFIG;
	$CONTENT = array();
	$THISDIR = $PAGE['directory_tree'][$PAGE['dir_depth']-1];
	
	$CONTENT['title'] = "Administrator panel";

	add_action('add_dir', 'url', '.edit_dir?action=add');
	add_action('user_management', 'url', '.usermgm');
	add_action('access', 'url', '.access');
	add_action('location', 'url', '.location');
	add_action('profiles', 'url', '.profile');
	add_action('maintenance', 'url', '.maintenance');
	add_action('logs', 'url', '.logs');
	add_action('mailcontents', 'url', '.mailcontentmgm');

	$CONTENT['body'] = "<p>Selecteer een van bovenstaande acties";

	$PAGE['content'] = $CONTENT;
}


/**
 * dress up page content using skin stuff
 */
function page_inc_dress() {
	global $PAGE;
	print_body($PAGE['content']['body']);
}

?>